<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<script src="https://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
	<title></title>
</head>
<body>
	<p>测试页面测试页面测试222</p>
	<a id="x2">退出</a>
	<script type="text/javascript">
		wx.miniProgram.postMessage({data:'test222'})
		var ua=window.navigator.userAgent.toLowerCase();
		
		$(function(){
			$("#x2").on("click",function(){
				
				 if(ua.match(/MicroMessenger/i) != 'micromessenger'){
				 		window.location.href="https://wnworld.com/api/JiaJiaDai/test.html"
				 }else{
				 	wx.miniProgram.getEnv(function(res) {
				 		if(res.miniprogram){
				 			alert("cccccc")
				 			wx.miniProgram.redirectTo({
					 			url:"/pages/index/sellerwebview/sellerwebview"
					 		})
				 		}else{
				 			window.location.href="https://wnworld.com/api/JiaJiaDai/test.html"
				 		}

				 	})
				 	
				 }
				
			});
		})

	</script>

</body>
</html>